import Form from "./form";
// import useStoreState from "@module/useStoreState";
export default function UserA() {
    console.log("userA.js init");
    const [state, setState] = React.useState({
        user: {
            name: "userA"
        }
    });
    const name1 = useStoreState("userName", null, "00000");

    React.useEffect(() => {
        console.log("userA.js mount+update");
        UserApi.addUserStateHook(setState);
        // let clean = StoreApi.addStoreStateHook("userName", setName1);
        // return function() {
        //     console.log("remove");
        //     clean();
        // };
    });
    return (
        <div>
            用户名：{state.user.name}
            记录1111：{name1}
            <br />
            <Form />
        </div>
    );
}
